import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("fa_cms_order",{schema:"fastadmin" } )
@Index("archives_id",["archives_id",])
export class fa_cms_order {

    @PrimaryGeneratedColumn({
        type:"int", 
        name:"id"
        })
    id:number;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"orderid"
        })
    orderid:string | null;
        

    @Column("int",{ 
        nullable:true,
        default: () => "'0'",
        name:"user_id"
        })
    user_id:number | null;
        

    @Column("int",{ 
        nullable:true,
        default: () => "'0'",
        name:"archives_id"
        })
    archives_id:number | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:100,
        name:"title"
        })
    title:string | null;
        

    @Column("double",{ 
        nullable:true,
        default: () => "'0.00'",
        precision:10,
        scale:2,
        name:"amount"
        })
    amount:number | null;
        

    @Column("double",{ 
        nullable:true,
        default: () => "'0.00'",
        precision:10,
        scale:2,
        name:"payamount"
        })
    payamount:number | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"paytype"
        })
    paytype:string | null;
        

    @Column("int",{ 
        nullable:true,
        name:"paytime"
        })
    paytime:number | null;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"ip"
        })
    ip:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"useragent"
        })
    useragent:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"memo"
        })
    memo:string | null;
        

    @Column("int",{ 
        nullable:true,
        name:"createtime"
        })
    createtime:number | null;
        

    @Column("int",{ 
        nullable:true,
        name:"updatetime"
        })
    updatetime:number | null;
        

    @Column("enum",{ 
        nullable:true,
        default: () => "'created'",
        enum:["created","paid","expired"],
        name:"status"
        })
    status:string | null;
        
}
